/**
 * 轮播图基础信息
 */
export interface Banner {
  id: number;
  title: string;
  image: string;
  linkUrl?: string;
  sortOrder: number;
  position: number; // 1-首页顶部，2-首页中部
  startTime?: string;
  endTime?: string;
  status: number;
  createdAt: string;
  updatedAt: string;
}

/**
 * 创建轮播图请求
 */
export interface CreateBannerRequest {
  title: string;
  image: string;
  linkUrl?: string;
  sortOrder?: number;
  position: number; // 1-首页顶部，2-首页中部
  startTime?: string;
  endTime?: string;
  status?: number;
}

/**
 * 更新轮播图请求
 */
export interface UpdateBannerRequest {
  title?: string;
  image?: string;
  linkUrl?: string;
  sortOrder?: number;
  position?: number; // 1-首页顶部，2-首页中部
  startTime?: string;
  endTime?: string;
  status?: number;
}

/**
 * 轮播图查询参数
 */
export interface BannerQueryParams {
  page?: number;
  limit?: number;
  keyword?: string;
  status?: number;
  position?: number; // 1-首页顶部，2-首页中部
  start_date?: string;
  end_date?: string;
  dateRange?: string[];
}

/**
 * 轮播图列表响应
 */
export interface BannerListResponse {
  code: number;
  message: string;
  data: {
    banners: Banner[];
    total: number;
    page: number;
    limit: number;
    totalPages: number;
  };
  timestamp?: string;
}

/**
 * 轮播图统计响应
 */
export interface BannerStatsResponse {
  code: number;
  message: string;
  data: {
    total: number;
    active: number;
    inactive: number;
    expired: number;
    upcoming?: number;
    byPosition?: Record<string, number>;
  };
  timestamp?: string;
}

/**
 * 轮播图位置选项
 */
export const BANNER_POSITIONS = [
  { value: 1, label: '首页顶部' },
  { value: 2, label: '首页中部' }
];

/**
 * 轮播图状态选项
 */
export const BANNER_STATUS = [
  { value: 1, label: '启用' },
  { value: 0, label: '禁用' }
];